{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e5057efb",
   "metadata": {},
   "outputs": [],
   "source": [
    "# extensions=all\n",
    "# 1. 调用requests模块（goole chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2. 请求方法：GET\n",
    "\n",
    "# 3. URL 地址：https://restapi.amap.com/v3/place/text?parameters\n",
    "geo_url = \"https://restapi.amap.com/v3/place/text?parameters\"\n",
    "\n",
    "# 4. 准备参数：拥有交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"9a6e4ee576049d27a048c34720d25b17\",\n",
    "    \"address\":\"广东省广州市从化区广州南方学院\"，\n",
    "}\n",
    "r = requests.get(url=geo_url,params=payload)\n",
    "广州南方学院_location = r.json()\n",
    "r = requests.get(url = geo_url,params = payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "023e7baa",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4678d974",
   "metadata": {},
   "outputs": [],
   "source": [
    "# extensions=all\n",
    "# 1. 调用requests模块（goole chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2. 请求方法：GET\n",
    "\n",
    "# 3. URL 地址：https://restapi.amap.com/v3/place/text?parameters\n",
    "geo_url = \"https://restapi.amap.com/v3/place/text?parameters\"\n",
    "\n",
    "# 4. 准备参数：拥有交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"9a6e4ee576049d27a048c34720d25b17\",\n",
    "    \"location\":广州南方学院_location,\n",
    "    \"keywords\":\"中餐厅\",\n",
    "    \"page\":1\n",
    "}\n",
    "r = requests.get(url=geo_url,params=payload)\n",
    "广州南方学院_location = r.json()\n",
    "r = requests.get(url = geo_url,params = payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bac0ed54",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2b6cf3ca",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ae8e0d9c",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9d6a8247",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
